package com.eii.system.controller.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.eii.excel.annotation.DictFormat;
import com.eii.excel.convert.DictConvert;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
public class SysDictDataExcel {

    /**
     * 字典编码
     */
    @ExcelProperty(value = "字典编码")
    private Long dictCode;

    /**
     * 字典排序
     */
    @ExcelProperty(value = "字典排序")
    private Long dictSort;

    /**
     * 字典标签
     */
    @NotBlank(message = "字典标签不能为空")
    @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
    @ExcelProperty(value = "字典标签")
    private String dictLabel;

    /**
     * 字典键值
     */
    @NotBlank(message = "字典键值不能为空")
    @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
    @ExcelProperty(value = "字典键值")
    private String dictValue;

    /**
     * 字典类型
     */
    @NotBlank(message = "字典类型不能为空")
    @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
    @ExcelProperty(value = "字典类型")
    private String dictType;

    /**
     * 是否默认（Y是 N否）
     */
    @DictFormat("Y=是,N=否")
    @ExcelProperty(value = "是否默认", converter = DictConvert.class)
    private String isDefault;

    /**
     * 状态（0正常 1停用）
     */
    @DictFormat("0=正常,1=停用")
    @ExcelProperty(value = "状态", converter = DictConvert.class)
    private String status;
}
